import Vue from 'vue'
import VueRouter from 'vue-router'
import Login from '../pages/login/Login'
import RealTime from '../pages/RealTime/RealTime'
import Manage from '../pages/Manage/Manage'
import Count from '../pages/Count/Count'
import Profile from '../pages/Profile/Profile'
import Error from '../pages/Error/Error'
import EventHandle from '../pages/Manage/EventHandle/EventHandle'
import TimeWatch from '../pages/Manage/TimeWatch/TimeWatch'
import BasicBuild from '../pages/Manage/BasicBuild/BasicBuild'
import SystemWatch from '../pages/Manage/SystemWatch/SystemWatch'
import CommitBook from '../pages/Manage/CommitBook/CommitBook'
import Verify from '../pages/Manage/Verify/Verify'
import Detail from '../pages/Manage/EventHandle/Detail/Detail'
import ModifyPassword from '../pages/Profile/ModifyPassword/ModifyPassword'
import Income from '../pages/Count/Income/Income'
import ServiceArea from '../pages/Count/ServiceArea/ServiceArea'
import Toll from '../pages/Count/Toll/Toll'
import IncomeDetail from '../pages/Count/Income/Detail/IncomeDetail'
import ServiceAreaDetail from '../pages/Count/ServiceArea/Detail/ServiceAreaDetail'
import Vedio from '../pages/Manage/TimeWatch/Vedio/Vedio'
import SubCenterDetail from '../pages/Count/Income/Detail/SubCenterDetail/SubCenterDetail'
Vue.use(VueRouter)
const routes = [
  {
    path: '/login',
    component: Login
  },
  {
    path: '/',
    redirect: '/login'
  },
  {
    path: '/realtime',
    component: RealTime,
    meta: {
      showFooter: true
    }
  },
  {
    path: '/manage',
    component: Manage,
    meta: {
      showFooter: true
    }
  },
  {
    path: '/count',
    component: Count,
    meta: {
      showFooter: true
    },
    children: [
      {
        path: '/count/income',
        component: Income,
        meta: {
          showFooter: true
        }
      },
      {
        path: '/count/servicearea',
        component: ServiceArea,
        meta: {
          showFooter: true
        }
      },
      {
        path: '/count/toll',
        component: Toll,
        meta: {
          showFooter: true
        }
      },
      {
        path: '',
        redirect: '/count/income'
      }
    ]
  },
  {
    path: '/count/servicearea/detail',
    component: ServiceAreaDetail
  },
  {
    path: '/count/income/detail',
    component: IncomeDetail
  },
  {
    path: '/count/income/subcenter/detail',
    component: SubCenterDetail
  },
  {
    path: '/profile',
    component: Profile
  },
  {
    path: '/profile/modifypassword',
    component: ModifyPassword
  },
  {
    path: '/manage/eventhandle',
    component: EventHandle
  },
  {
    path: '/manage/eventhandle/detail',
    component: Detail
  },
  {
    path: '/manage/timewatch',
    component: TimeWatch
  },
  {
    path: '/manage/basicbuild',
    component: BasicBuild
  },
  {
    path: '/manage/systemwatch',
    component: SystemWatch
  },
  {
    path: '/manage/commitbook',
    component: CommitBook
  },
  {
    path: '/manage/verify',
    component: Verify
  },
  {
    path: '/vedio',
    component: Vedio
  }
]

const router = new VueRouter({
  routes
})

export default router
